package com.spc.car.data.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spc.car.data.entity.sys.SysDept;
import com.spc.car.data.entity.sys.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 部门表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-03-06
 */
public interface SysDeptMapper extends BaseMapper<SysDept> {

    List<Integer> selectDeptListByRoleId(Long roleId);

    int checkDeptExistUser(Long deptId);

    /**
     * 查询某一部门下某一角色的用户
     * @param deptId
     * @param roleId
     * @return
     */
    List<SysUser> queryDepartmentRoleUsers(@Param("deptId")Long deptId, @Param("roleId")Long roleId);
}
